﻿<%@ Page Title="Agendamento de visita" MasterPageFile="~/Site.master" Language="C#" AutoEventWireup="true" CodeBehind="Apointment.aspx.cs" Inherits="LuckyLoot.Presentation.ApointmentPage" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <fieldset><legend>Agendamento de visita</legend>
    <div>
        <label for="apointmentTitle">Titulo (breve descrição)*</label><br />
        <asp:TextBox runat="server" ID="apointmentTitle" ClientIDMode="Static"  CssClass="k-textbox" required></asp:TextBox><br />

        <label for="apointmentDescription">Descrição</label><br />
        <asp:TextBox runat="server" ID="apointmentDescription" ClientIDMode="Static" Width="350" CssClass="k-textbox" TextMode="MultiLine" Columns="20" Rows="4"></asp:TextBox><br />
        
        <label for="apointmentCustomer">Cliente*</label><br />
        <asp:DropDownList runat="server" ID="apointmentCustomer" ClientIDMode="Static"  Width="350" required></asp:DropDownList><br />

        <label for="apointmentArtist">Tatuador*</label><br />
        <asp:DropDownList runat="server" ID="apointmentArtist" ClientIDMode="Static" Width="350" required></asp:DropDownList><br />

        <label for="apointmentDate">Data do atendimento*</label><br />
        <asp:TextBox runat="server" ID="apointmentDate" ClientIDMode="Static"  Width="350" required></asp:TextBox> <span class="k-invalid-msg" data-for="ctl00$MainContent$apointmentDate"></span><br />

        <label for="apointmentReturnDate">Data de retorno</label><br />
        <asp:TextBox runat="server" ID="apointmentReturnDate" ClientIDMode="Static"  Width="350"></asp:TextBox><br /><br />

        <asp:Button runat="server" ID="SaveApointment" CssClass="k-button"  Text="Salvar" /> 
        <asp:Button runat="server" ID="ConvertToTattooApointment" CssClass="k-button" Visible="false" Text="Transformar em tatuagem" ToolTip="Clique aqui para transformar este agendamento de visita em um agendamento de tatuagem." />
    </div>
    </fieldset>
    <h1><asp:Label ID="apointmentsLabel" Visible="false" runat="server" Text="Visitas"></asp:Label></h1>
    <asp:GridView ID="apointmentsGrid" Visible="false" ClientIDMode="Static" runat="server" EmptyDataText="-" ></asp:GridView>
    <script>
            $(document).ready(function () {

                var currentTime = new Date();
                var month = currentTime.getMonth();
                var day = currentTime.getDate();
                var year = currentTime.getFullYear();

                $("#apointmentDate").kendoDateTimePicker({
                    format: "dd/MM/yyyy HH:mm",
                    start: "month",
                    depth: "month",
                    min: new Date(year, month, day)
                });
                
                $("#apointmentReturnDate").kendoDateTimePicker({
                    format: "dd/MM/yyyy HH:mm",
                    start: "month",
                    depth: "month",
                    min: new Date(year, month, day)
                });

                $("#apointmentCustomer").kendoComboBox();

                $("#apointmentArtist").kendoComboBox();

                $("#apointmentsGrid").kendoGrid({
                    selectable: true
                });
            });
</script>
</asp:Content>
